Data Collect Extraction
data_collect_company_hierarchies
| Column | Type | Description |
|---|---|---|
data_collect_company_hierarchy_id | int64 | Primary key (data_collect_company_hierarchies.id). |
tenancy_id | int64 | Tenant owning the hierarchy row. |
company_id | int64 | Company the hierarchy applies to. |
name | string | Display name (getName() on the model). |
cycle_name | string | Data collect cycle name (data_collect_cycles.name). |
cycle_type | string | Cycle type field on the cycle. |
cycle_period | string | Cycle period / year label (dataCollectCycle.cycle — same source as the inventory year in practice). |
type | string | Hierarchy type code (DataCollectCompanyHierarchy.type). |
type_pt | string | Type label in Portuguese (DataCollectCompanyHierarchyTypeEnum::translate). |
type_es | string | Type label in Spanish. |
breadcrumb | string | Full breadcrumb string (getCompleteBreadcrumb()). |
hierarchy_1 … hierarchy_5 | string | Breadcrumb split on > (max 5 levels; overflow merged into level 5). |
updated_at | dateTime | Last update at source. |
deleted_at | dateTime | Soft delete. |
data_collect_task_responsibles
| Column | Type | Description |
|---|---|---|
data_collect_task_responsible_id | int64 | data_collect_tasks.id (same as the task being described). |
filling_user_ids | string | Filling responsible user ids (comma-separated, unique). |
filling_user_names | string | Filling users’ display names. |
filling_usernames | string | Filling users’ login identifiers (email or login). |
filling_user_sector_ids | string | Sector ids for those users in this tenancy (user_sectors). |
filling_user_sector_names | string | Sector names. |
filling_user_partner_ids | string | Service provider partner ids linked to users. |
filling_user_partner_names | string | Partner names. |
audit_user_ids | string | Audit role — user ids. |
audit_user_names | string | Audit user names. |
audit_usernames | string | Audit login identifiers. |
audit_user_sector_ids | string | Audit users’ sector ids (same tenancy scope). |
audit_user_sector_names | string | Audit sector names. |
audit_user_partner_ids | string | Audit partner ids. |
audit_user_partner_names | string | Audit partner names. |
final_user_ids | string | Final approval user ids. |
final_user_names | string | Final approval names. |
legal_user_ids | string | Legal role user ids. |
legal_user_names | string | Legal role names. |
technical_user_ids | string | Technical role user ids. |
technical_user_names | string | Technical role names. |
other_user_ids | string | Other responsibles — user ids. |
other_user_names | string | Other responsibles — names. |
updated_at | dateTime | Last update of the task. |
deleted_at | dateTime | Soft delete of the task. |
data_collect_tasks
| Column | Type | Description |
|---|---|---|
data_collect_task_id | int64 | Primary key (data_collect_tasks.id). |
business_group_id | int64 | Business group via tenancy.company. |
tenancy_id | int64 | Tenant of the task. |
confirmed_filling_user_id | int64 | Confirmed filling user (filling_user_id on the task). |
confirmed_audit_user_id | int64 | Confirmed audit user (audit_user_id). |
taskable_id | int64 | Polymorphic target id (e.g. hierarchy, PGR node, source row). |
related_partner_id | int64 | Partner linked to the task context (getAllRelatedPartners()). |
taskable_type | string | Polymorphic model class name. |
status | string | Task status enum value. |
name | string | Task title / name. |
model_name | string | Human-readable model label (getModelName()). |
sub_status | string | Sub-status (validated enum string). |
type | string | Task type enum value. |
related_partner_cnpj | string | Partner tax id (CPF/CNPJ) or '-'. |
related_partner_formatted_cpf_cnpj | string | Partner tax id formatted. |
related_partner_name | string | Partner name. |
disapproval_reason | string | Reason when a step is rejected. |
not_answer_justification | string | Justification when the task cannot be answered. |
can_not_answer | boolean | Whether answering is blocked for the respondent. |
is_priority | boolean | Priority flag. |
reproved_count | int32 | Count of rejection events. |
expected_answer_date | dateTime | Expected answer date from PGR cycle (data_collect_finish_at on related PGR cycle). |
expected_pgr_release_date | dateTime | Same source as expected_answer_date in current mapping (data_collect_finish_at). |
expected_pgr_finish_date | dateTime | Expected cycle end (cycle_finish_at on PGR cycle). |
due_date | dateTime | Task due date. |
audit_deadline_date | dateTime | Audit deadline. |
executed_at | dateTime | When the task was executed / completed by filler. |
audit_at | dateTime | When audited (audited_at). |
send_to_audit_at | dateTime | When sent to audit (sent_to_audit_at). |
reproved_at | dateTime | Last rejection timestamp. |
finished_at | dateTime | When the task finished fully. |
updated_at | dateTime | Last update. |
deleted_at | dateTime | Soft delete. |
pgr_document_revision_related_tasks
| Column | Type | Description |
|---|---|---|
pgr_document_revision_related_task_id | int64 | Child data collect task id (childManuallyDataCollectTasks if parent has name, else childDataCollectTasks). |
document_related_data_collect_task_id | int64 | Parent document-revision task id. |
updated_at | dateTime | Parent task’s updated_at. |
deleted_at | dateTime | Parent task’s deleted_at. |
pgr_wastes
| Column | Type | Description |
|---|---|---|
pgr_waste_id | int64 | Primary key (pgr_treatment_answers.id). |
data_collect_task_id | int64 | Owning task via pgrCycleWasteAnswer.data_collect_task_id. |
waste_id | int64 | Waste catalog id. |
waste_treatment_id | int64 | Treatment id applied to the line. |
transporter_partner_id | int64 | Transporter partner id (transporter_id). |
recycler_partner_id | int64 | Recipient / recycler partner id (recipient_id). |
unit_measure | string | Waste unit abbreviation (from waste’s unit of measure). |
frequency | string | Generation frequency code (e.g. DAILY, MONTHLY). |
frequency_value | string | Extra frequency parameter (frequency_observation, e.g. weeks per year for WEEKLY). |
kg_quantity | double | Quantity converted to kg (or raw if already kg), using unit conversion when needed. |
quantity | double | Quantity in the waste’s native unit. |
yearly_kg_quantity | double | Annualized kg using getYearlyQuantity rules (frequency multipliers). |
yearly_quantity | double | Annualized quantity in the native unit (same rules). |
waste_generation_point_names | string | Names from linked processes on the cycle waste answer (aggregated for display). |
packing_names | string | Packing names linked to the cycle waste answer. |
final_waste_disposal_names | string | Central packing / final destination names (centralPackings). |
updated_at | dateTime | Last update of the treatment answer. |
deleted_at | dateTime | Soft delete. |
resource_custom_field_values
| Column | Type | Description |
|---|---|---|
resource_custom_field_value_id | string | Synthetic stable id (first 32 hex chars of SHA-256 over field id, value id, period value id, months, year). |
resource_custom_field_id | int64 | Field definition id. |
resource_custom_field_period_value_id | int64 | Period slice: resource_custom_field_period_values.id. Non-period: resource_custom_field_values.id (the parent value row). |
customable_id | int64 | Polymorphic target id (document, checklist execution, waste, etc.). |
customable_type | string | Normalized resource type (DOCUMENT, CHECKLIST_EXECUTION, WASTE, … — see getCustomableType). |
period_type | string | inform_period_type from field config if period-based; else NOT_APPLIED. |
row_index | string | Row index for repeatable field grids. |
year | int32 | Year of the value or period. |
months | string | Months covered (translated month names, comma-separated) or N/A / single month for non-period. |
value | string | Stored / formatted value (numeric sanitization or label expansion for select/binary). |
updated_at | dateTime | Last update (period row vs parent as built in fromModel). |
deleted_at | dateTime | Soft delete. |
resource_custom_fields
| Column | Type | Description |
|---|---|---|
resource_custom_field_id | int64 | Primary key (resource_custom_fields.id). |
business_group_id | int64 | Business group of the field’s tenant. |
tenancy_id | int64 | Tenant that owns the field definition. |
checklist_id | int64 | Checklist id when the field belongs to a checklist context. |
resource_type | string | Customized resource code (CustomizedResourceEnum) or CHECKLIST if no customized resource. |
section_breadcrumb | string | Section path in the form (resource_custom_field_sections.tree_breadcrumb). |
field_name | string | Field label / name. |
updated_at | dateTime | Last update. |
deleted_at | dateTime | Soft delete. |